package edu.gatech.cs2340.teamrocket.model.environment;

/**
 * The yearly seasons.
 *
 * @author Joe Tacheron
 */
public enum Season {
    SUMMER(
            Weather.SUNNYDAY,
            Weather.RAINYDAY,
            Weather.WINDY,
            Weather.SANDSTORM),
    FALL(
            Weather.SUNNYDAY,
            Weather.RAINYDAY,
            Weather.WINDY,
            Weather.FOG),
    WINTER(
            Weather.SUNNYDAY,
            Weather.RAINYDAY,
            Weather.SNOWYDAY,
            Weather.HAIL,
            Weather.BLIZZARD,
            Weather.WINDY),
    SPRING(
            Weather.SUNNYDAY,
            Weather.RAINYDAY,
            Weather.THUNDERSTORM,
            Weather.WINDY);

    private Weather[] possibleWeathers;

    private Season(Weather ... weathers){
        possibleWeathers = weathers;
    }

    /**
     * @return a random weather from a list of possible choices.
     */
    public Weather getRandomWeather(){
        return possibleWeathers[(int)(Math.random() * possibleWeathers.length)];
    }
}
